﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ShowLeaguerInfo : System.Web.UI.Page
{
    Operation operation = new Operation();
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"].ToString();
        //DataSet ds = operation.SelectLeaguerInfo(id);
        try
        {
            DataSet ds = operation.SelectPublicInfoById(Convert.ToInt32(id), true);
            txtType.Text = ds.Tables[0].Rows[0][1].ToString();
            txtTitle.Text = ds.Tables[0].Rows[0][2].ToString();
            txtInfo.Text = ds.Tables[0].Rows[0][3].ToString();
            //txtLinkMan.Text = ds.Tables[0].Rows[0][4].ToString();
            //txtTel.Text = ds.Tables[0].Rows[0][5].ToString();
            if (ds.Tables[0].Rows[0][9].ToString().CompareTo("0") != 0)
            {
                txtType.Text = txtType.Text + "--" +
                    operation.SelectCategoryByID(ds.Tables[0].Rows[0][9].ToString()).Tables[0].Rows[0][1].ToString();
            }
            this.notXQInfoPanel.Visible = true;
            this.XQInfoPanel.Visible = false;
            if(txtType.Text.IndexOf("需求")!=-1)
            {
                this.notXQInfoPanel.Visible = false;
                this.XQInfoPanel.Visible = true;
                lbPrjMan.Text = ds.Tables[0].Rows[0][4].ToString();
                lbPrjName.Text = ds.Tables[0].Rows[0][2].ToString();
                lbWayReq.Text = ds.Tables[0].Rows[0][3].ToString();
                lbTel.Text = ds.Tables[0].Rows[0][5].ToString();
                lbComName0.Text = ds.Tables[0].Rows[0][10].ToString();
                lbDept.Text = ds.Tables[0].Rows[0][11].ToString();
                lbRanks.Text = ds.Tables[0].Rows[0][12].ToString();
                lbAddress0.Text = ds.Tables[0].Rows[0][13].ToString();
                lbPostCode.Text = ds.Tables[0].Rows[0][14].ToString();
                lbPhone.Text = ds.Tables[0].Rows[0][15].ToString();
                lbFx.Text = ds.Tables[0].Rows[0][16].ToString();
                lbEmail.Text = ds.Tables[0].Rows[0][17].ToString();
                lbProblem.Text = ds.Tables[0].Rows[0][18].ToString();
                lbComInfo.Text = ds.Tables[0].Rows[0][19].ToString();
                lbNewPrd.Text = ds.Tables[0].Rows[0][20].ToString();
                lbWill.Text = ds.Tables[0].Rows[0][21].ToString();
            }
        }
        catch (Exception ex) { }
    }
}
